
import 'package:flutter/material.dart';
import 'package:uuid/uuid.dart';

class Util{

  static String uuid() => Uuid().v4();

  static void showSimpleAlert(BuildContext context, String message) {
    showDialog(
      context: context,
      builder: (context) => SimpleDialog(
        backgroundColor: Color(0xff242424),
        children: [
          Container(
            padding: EdgeInsets.all(16),
            child: Center(
              child: Text(message,style: TextStyle(
                color: Color(0xffdddddd),
                fontSize: 16
              ),),
            ),
          ),
          TextButton(
            child: Text('关闭',style: TextStyle(
              color: Color(0xffcccccc)
            ),),
            onPressed: () => Navigator.pop(context),
          ),
        ],
      ),
    );
  }

}

